package mypackage;

import java.util.Scanner;

public class testclass4 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入6个评委的打分");
        int [] arr=new int[6];
        for(int i=0;i<6;++i){
            int num=sc.nextInt();
            arr[i]=num;
        }
        int min=arr[0],max=arr[0];
        int sum=arr[0];
        for (int i = 1; i < 6; i++) {
            if(arr[i]>max){
                max=arr[i];
            }
            if(arr[i]<min){
                min=arr[i];
            }
            sum+=arr[i];
        }
        sum-=min+max;
        double avg=sum*1.0/4;
        System.out.println(avg);
    }
}
